package pers.duorhs.grgbusstation.controller;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import pers.duorhs.grgbusstation.domain.Feedback;
import pers.duorhs.grgbusstation.service.FeedbackService;

/**
 * @author Duorhs
 * @date 2022/8/3 15:34
 */
@RestController
@AllArgsConstructor
@Tag(name = "用户反馈API")
@CrossOrigin
public class FeedbackController {

    private FeedbackService feedbackService;

    @PostMapping("feedback/new")
    @Operation(tags = "增加新反馈")
    public void newFeedback(@RequestBody Feedback feedback) {
        feedbackService.newFeedback(feedback);
    }
}
